package com.gxa.community.admin.controller.user;


import com.gxa.community.admin.service.user.UserTagsService;
import com.gxa.community.core.pojo.dto.userdto.UserTagsDto;
import com.gxa.community.core.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author juran
 * @since 2022-07-19
 */
@RestController
@RequestMapping("/user/tag")
public class UserTagsController {

    @Autowired
    UserTagsService userTagsService;

    @PutMapping("editUserTag")
    public R editUserTag(@RequestBody UserTagsDto userTagsDto) {
        return userTagsService.editUserTags(userTagsDto);
    }

    @PostMapping("queryUserTag")
    public R queryUserTags(@RequestBody UserTagsDto userTagsDto) {
        return userTagsService.queryUserTags(userTagsDto);
    }

    @DeleteMapping("delUserTag")
    public R delUserTag(@RequestBody UserTagsDto userTagsDto) {
        return userTagsService.delUserTags(userTagsDto);
    }


    @PostMapping("addUserTag")
    public R addUserTag(@RequestBody UserTagsDto userTagsDto) {
        return userTagsService.editUserTags(userTagsDto);
    }
}

